package defpackage; import com.mopub.nativeads.MoPubNativeAdPositioning; import java.io.IOException; import java.io.PrintStream; /* renamed from: aact reason: default package */ public final class aact implements aacs { static int BSK; static final long[] BSM = {0, 0, -1, -1}; static final int[] BSN = new int[0]; public static final String[] BSO = {"", "\r", "\n", ";", "=", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null}; public static final String[] BSP = {"DEFAULT", "INCOMMENT", "NESTED_COMMENT", "INQUOTEDSTRING"}; public static final int[] BSQ = {-1, -1, -1, -1, -1, -1, 1, 0, -1, 2, -1, -1, -1, -1, -1, 3, -1, -1, 0, -1, -1, -1, -1}; static final long[] BSR = {1835039}; static final long[] BSS = {160}; static final long[] BST = {32}; static final long[] BSU = {261952}; public PrintStream BSL; protected aacv BSV; private final int[] BSW; private final int[] BSX; StringBuffer BSY; int BSZ; int BTa; protected char BTb; int BTc; int BTd; int BTe; int BTf; int BTg; int BTh; public aact(aacv aacv) { this.BSL = System.out; this.BSW = new int[3]; this.BSX = new int[6]; this.BTc = 0; this.BTd = 0; this.BSV = aacv; } public aact(aacv aacv, int i) { this(aacv); axq(i); } private final void axp(int i) { if (this.BSW[i] != this.BTf) { int[] iArr = this.BSX; int i2 = this.BTe; this.BTe = i2 + 1; iArr[i2] = i; this.BSW[i] = this.BTf; } } private void axq(int i) { if (i >= 4 || i < 0) { throw new aacx("Error: Ignoring invalid lexical state : " + i + ". State unchanged.", 2); } this.BTc = i; } private final int cp(int i, int i2, int i3) { this.BTh = i2; this.BTg = 0; try { this.BTb = this.BSV.readChar(); return nv(2, 1); } catch (IOException e) { return 1; } } private final void gUB() { this.BTf = -2147483647; int i = 3; while (true) { int i2 = i - 1; if (i > 0) { this.BSW[i2] = Integer.MIN_VALUE; i = i2; } else { return; } } } private aacw gUC() { int i = this.BTh; aacw aacw = new aacw(); aacw.BTv = this.BTh; String str = BSO[this.BTh]; if (str == null) { str = this.BSV.gUI(); } aacw.image = str; aacw.BTw = this.BSV.gUH(); aacw.BTx = this.BSV.gUG(); aacw.BTy = this.BSV.gUF(); aacw.BTz = this.BSV.gUE(); return aacw; } private final int nu(int i, int i2) { this.BTh = i2; this.BTg = 0; return 1; } private final int nv(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = i; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { long j = 1 << this.BTb; do { i4--; switch (this.BSX[i4]) { case 0: if ((4294967808L & j) != 0) { i5 = 5; axp(0); continue; } else { continue; } case 1: if ((287948901175001088L & j) == 0) { continue; } else { if (i5 > 19) { i5 = 19; } axp(1); continue; } case 2: if ((288068726467591679L & j) == 0) { continue; } else { if (i5 > 20) { i5 = 20; } axp(2); continue; } case 3: if ((288068726467591679L & j) != 0) { if (i5 > 20) { i5 = 20; } axp(2); } else if ((4294967808L & j) != 0) { if (i5 > 5) { i5 = 5; } axp(0); } if ((287948901175001088L & j) == 0) { continue; } else { if (i5 > 19) { i5 = 19; } axp(1); continue; } } } while (i4 != i3); } else if (this.BTb < 128) { long j2 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 2: case 3: if ((-939524098 & j2) != 0) { i5 = 20; axp(2); continue; } else { continue; } } } while (i4 != i3); } else { int i7 = (this.BTb & 255) >> 6; long j3 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 2: case 3: if ((BSM[i7] & j3) == 0) { continue; } else { if (i5 > 20) { i5 = 20; } axp(2); continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BSV.readChar(); } catch (IOException e) { } } return i2; } } private final int nw(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = 0; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 10) { i5 = 10; continue; } else { continue; } case 1: if (i5 > 8) { i5 = 8; continue; } else { continue; } } } while (i4 != i3); } else if (this.BTb < 128) { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 10) { i5 = 10; } if (this.BTb == '\\') { int[] iArr = this.BSX; int i7 = this.BTe; this.BTe = i7 + 1; iArr[i7] = 1; continue; } else { continue; } case 1: if (i5 > 8) { i5 = 8; continue; } else { continue; } case 2: if (i5 > 10) { i5 = 10; continue; } else { continue; } } } while (i4 != i3); } else { int i8 = (this.BTb & 255) >> 6; long j = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: if ((BSM[i8] & j) != 0 && i5 > 10) { i5 = 10; continue; } case 1: if ((BSM[i8] & j) != 0 && i5 > 8) { i5 = 8; continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BSV.readChar(); } catch (IOException e) { } } return i2; } } private final int nx(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = 0; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { long j = 1 << this.BTb; do { i4--; switch (this.BSX[i4]) { case 0: case 2: if ((-17179869185L & j) == 0) { continue; } else { if (i5 > 17) { i5 = 17; } axp(2); continue; } case 1: if (i5 > 16) { i5 = 16; continue; } else { continue; } } } while (i4 != i3); } else if (this.BTb < 128) { long j2 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: if ((-268435457 & j2) != 0) { if (i5 > 17) { i5 = 17; } axp(2); continue; } else if (this.BTb == '\\') { int[] iArr = this.BSX; int i7 = this.BTe; this.BTe = i7 + 1; iArr[i7] = 1; continue; } else { continue; } case 1: if (i5 > 16) { i5 = 16; continue; } else { continue; } case 2: if ((-268435457 & j2) == 0) { continue; } else { if (i5 > 17) { i5 = 17; } axp(2); continue; } } } while (i4 != i3); } else { int i8 = (this.BTb & 255) >> 6; long j3 = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: case 2: if ((BSM[i8] & j3) == 0) { continue; } else { if (i5 > 17) { i5 = 17; } axp(2); continue; } case 1: if ((BSM[i8] & j3) != 0 && i5 > 16) { i5 = 16; continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BSV.readChar(); } catch (IOException e) { } } return i2; } } private final int ny(int i, int i2) { int i3 = 0; this.BTe = 3; int i4 = 1; this.BSX[0] = 0; int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; while (true) { int i6 = this.BTf + 1; this.BTf = i6; if (i6 == Integer.MAX_VALUE) { gUB(); } if (this.BTb < '@') { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 14) { i5 = 14; continue; } else { continue; } case 1: if (i5 > 11) { i5 = 11; continue; } else { continue; } } } while (i4 != i3); } else if (this.BTb < 128) { do { i4--; switch (this.BSX[i4]) { case 0: if (i5 > 14) { i5 = 14; } if (this.BTb == '\\') { int[] iArr = this.BSX; int i7 = this.BTe; this.BTe = i7 + 1; iArr[i7] = 1; continue; } else { continue; } case 1: if (i5 > 11) { i5 = 11; continue; } else { continue; } case 2: if (i5 > 14) { i5 = 14; continue; } else { continue; } } } while (i4 != i3); } else { int i8 = (this.BTb & 255) >> 6; long j = 1 << (this.BTb & '?'); do { i4--; switch (this.BSX[i4]) { case 0: if ((BSM[i8] & j) != 0 && i5 > 14) { i5 = 14; continue; } case 1: if ((BSM[i8] & j) != 0 && i5 > 11) { i5 = 11; continue; } } } while (i4 != i3); } if (i5 != Integer.MAX_VALUE) { this.BTh = i5; this.BTg = i2; i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; } i2++; i4 = this.BTe; this.BTe = i3; i3 = 3 - i3; if (i4 != i3) { try { this.BTb = this.BSV.readChar(); } catch (IOException e) { } } return i2; } } public final aacw gUD() { int nu; int i; int nu2; int nu3; int nu4; boolean z; String str; aacw aacw; aacw aacw2 = null; int i2 = 0; while (true) { try { aacv aacv = this.BSV; aacv.BTm = -1; char readChar = aacv.readChar(); aacv.BTm = aacv.BTn; this.BTb = readChar; this.BSY = null; this.BSZ = 0; while (true) { switch (this.BTc) { case 0: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '\n': nu4 = cp(0, 2, 2); break; case '\r': nu4 = cp(0, 1, 2); break; case '\"': nu4 = nu(0, 15); break; case '(': nu4 = nu(0, 6); break; case ';': nu4 = nu(0, 3); break; case '=': nu4 = nu(0, 4); break; default: nu4 = nv(3, 0); break; } i = nu4; break; case 1: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '(': nu3 = nu(0, 9); break; case ')': nu3 = nu(0, 7); break; default: nu3 = nw(0, 0); break; } i = nu3; break; case 2: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '(': nu2 = nu(0, 12); break; case ')': nu2 = nu(0, 13); break; default: nu2 = ny(0, 0); break; } i = nu2; break; case 3: this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; this.BTg = 0; switch (this.BTb) { case '\"': nu = nu(0, 18); break; default: nu = nx(0, 0); break; } i = nu; break; default: i = i2; break; } if (this.BTh != Integer.MAX_VALUE) { if (this.BTg + 1 < i) { this.BSV.axr((i - this.BTg) - 1); } if ((BSR[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) { aacw gUC = gUC(); gUC.BTB = aacw2; switch (this.BTh) { case 18: if (this.BSY == null) { this.BSY = new StringBuffer(); } StringBuffer stringBuffer = this.BSY; aacv aacv2 = this.BSV; int i3 = this.BSZ; int i4 = this.BTg + 1; this.BTa = i4; stringBuffer.append(aacv2.axs(i3 + i4)); gUC.image = this.BSY.substring(0, this.BSY.length() - 1); break; } if (BSQ[this.BTh] == -1) { return gUC; } this.BTc = BSQ[this.BTh]; return gUC; } else if ((BSS[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) { if ((BST[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) { aacw = gUC(); if (aacw2 != null) { aacw.BTB = aacw2; aacw2.BTA = aacw; } } else { aacw = aacw2; } if (BSQ[this.BTh] != -1) { this.BTc = BSQ[this.BTh]; aacw2 = aacw; i2 = i; } else { aacw2 = aacw; i2 = i; } } else { int i5 = this.BSZ; int i6 = this.BTg + 1; this.BTa = i6; this.BSZ = i5 + i6; switch (this.BTh) { case 8: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BSV.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 2); break; case 9: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BSV.axs(this.BSZ)); this.BSZ = 0; BSK = 1; break; case 11: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BSV.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 2); break; case 12: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BSV.axs(this.BSZ)); this.BSZ = 0; BSK++; break; case 13: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BSV.axs(this.BSZ)); this.BSZ = 0; int i7 = BSK - 1; BSK = i7; if (i7 == 0) { axq(1); break; } break; case 15: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BSV.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 1); break; case 16: if (this.BSY == null) { this.BSY = new StringBuffer(); } this.BSY.append(this.BSV.axs(this.BSZ)); this.BSZ = 0; this.BSY.deleteCharAt(this.BSY.length() - 2); break; } if (BSQ[this.BTh] != -1) { this.BTc = BSQ[this.BTh]; } this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT; try { this.BTb = this.BSV.readChar(); i2 = 0; } catch (IOException e) { i = 0; } } } } } catch (IOException e2) { this.BTh = 0; aacw gUC2 = gUC(); gUC2.BTB = aacw2; return gUC2; } } int gUF = this.BSV.gUF(); int gUE = this.BSV.gUE(); try { this.BSV.readChar(); this.BSV.axr(1); z = false; str = null; } catch (IOException e3) { String gUI = i <= 1 ? "" : this.BSV.gUI(); if (this.BTb == '\n' || this.BTb == '\r') { gUF++; z = true; str = gUI; gUE = 0; } else { gUE++; z = true; str = gUI; } } if (!z) { this.BSV.axr(1); str = i <= 1 ? "" : this.BSV.gUI(); } throw new aacx(z, this.BTc, gUF, gUE, str, this.BTb, 0); } }